package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Recommend;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;


import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

public interface RecommendMapper extends BaseMapper<Recommend> {


    @Select("SELECT * FROM recommend WHERE user_id = #{user_id} AND book_id = #{book_id}")
    List<Recommend> selectRecommend(@Param("user_id") Integer user_id,@Param("book_id") Integer book_id);


    ArrayList selectRecommendBook(@PathVariable("user_id") Integer user_id);
}
